package Vista;

import Entidades.Servicio;
import Logica.FactoryVistas;
import Logica.LogicaAplicacion;
import Logica.LogicaServicio;
import java.awt.Color;
import java.util.ArrayList;
import javax.swing.JOptionPane;

/**
 *
 * @author Puma
 */
public class InicioEntrevista extends javax.swing.JFrame implements Runnable {

     private Boolean inicio = true;
     private Thread t;
     private int minutos = 0, segundos = 0, horas = 0;
     private Boolean hayInternet = false;
     private ArrayList<Servicio> serviciosSeleccionados = new ArrayList<Servicio>();
     private String[] TipoServicios = {"VOZ","TRANSMISION","INTERNET","MOVILES","TELECOMUNICACIONES"};
     private String[] servicios = {"LINEAS TELEFONICAS COMERCIALES","CPA","PUERTOS CONMUTADOS","ENLACES DEDICADOS","DIAL UP","BANDA ANCHA","INTERNET DEDICADO","LINEA TELEFONICA MOVIL","DATA CENTER","CENTRO DE CONTACTO","ADMINISTRACION DE REDES"};     
     
    /** Creates new form InicioEntrevista */
    public InicioEntrevista(int minutos, int segundos, int horas) {
        initComponents();
        this.minutos = minutos;
        this.segundos = segundos;
        this.horas = horas;
        iniciarReloj();
    }
    public InicioEntrevista(){
        initComponents();
    }

    private void iniciarReloj(){
        t = new Thread(this);
        t.start();
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        jLTimer = new javax.swing.JLabel();
        jLLogo = new javax.swing.JLabel();
        jLTitulo = new javax.swing.JLabel();
        jLSponsor = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jChDirectamente = new javax.swing.JCheckBox();
        jChContratista = new javax.swing.JCheckBox();
        jCSiLT = new javax.swing.JCheckBox();
        jChNoLT = new javax.swing.JCheckBox();
        jChSiCPA = new javax.swing.JCheckBox();
        jChNoCPA = new javax.swing.JCheckBox();
        jChSiPC = new javax.swing.JCheckBox();
        jChNoPC = new javax.swing.JCheckBox();
        jChSiDU = new javax.swing.JCheckBox();
        jChNoCD = new javax.swing.JCheckBox();
        jChSiCC = new javax.swing.JCheckBox();
        jChNoAR = new javax.swing.JCheckBox();
        jChSiCD = new javax.swing.JCheckBox();
        jChNoCC = new javax.swing.JCheckBox();
        jChNoED = new javax.swing.JCheckBox();
        jChSiAR = new javax.swing.JCheckBox();
        jChNoDU = new javax.swing.JCheckBox();
        jChSiBA = new javax.swing.JCheckBox();
        jChSiID = new javax.swing.JCheckBox();
        jChNoID = new javax.swing.JCheckBox();
        jChSiMov = new javax.swing.JCheckBox();
        jChNoMov = new javax.swing.JCheckBox();
        jChSiED = new javax.swing.JCheckBox();
        jChNoBA = new javax.swing.JCheckBox();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jBAceptarServicios = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLTimer.setText("jLabel1");
        jLTimer.setBounds(924, 10, 70, 14);
        jLayeredPane1.add(jLTimer, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/DatinvestLogo.png"))); // NOI18N
        jLLogo.setBounds(10, 10, 80, 80);
        jLayeredPane1.add(jLLogo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLTitulo.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLTitulo.setText(".:: Instrumento de emprendedores  - Sección II: Servicios de técnología de información y telecomunicaciones ::. ");
        jLTitulo.setBounds(90, 20, 800, 14);
        jLayeredPane1.add(jLTitulo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLSponsor.setText("Desarrollado para Datinvest C.A");
        jLSponsor.setBounds(110, 40, 220, 14);
        jLayeredPane1.add(jLSponsor, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel2.setText("De los siguientes servicios de tecnología y telecomunicaciones ¿Cuáles son utilizados por la Empresa / Institución actualmente?");
        jLabel2.setBounds(30, 150, 860, 14);
        jLayeredPane1.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChDirectamente.setBackground(new java.awt.Color(255, 255, 255));
        jChDirectamente.setText("Directamente");
        jChDirectamente.setBounds(60, 120, 89, 23);
        jLayeredPane1.add(jChDirectamente, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChContratista.setBackground(new java.awt.Color(255, 255, 255));
        jChContratista.setText("Contratista");
        jChContratista.setBounds(170, 120, 110, 23);
        jLayeredPane1.add(jChContratista, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jCSiLT.setBackground(new java.awt.Color(255, 255, 255));
        jCSiLT.setText("Si");
        jCSiLT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCSiLTActionPerformed(evt);
            }
        });
        jCSiLT.setBounds(790, 200, 33, 23);
        jLayeredPane1.add(jCSiLT, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoLT.setBackground(new java.awt.Color(255, 255, 255));
        jChNoLT.setSelected(true);
        jChNoLT.setText("No");
        jChNoLT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoLTActionPerformed(evt);
            }
        });
        jChNoLT.setBounds(830, 200, 39, 23);
        jLayeredPane1.add(jChNoLT, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiCPA.setBackground(new java.awt.Color(255, 255, 255));
        jChSiCPA.setText("Si");
        jChSiCPA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiCPAActionPerformed(evt);
            }
        });
        jChSiCPA.setBounds(790, 220, 33, 23);
        jLayeredPane1.add(jChSiCPA, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoCPA.setBackground(new java.awt.Color(255, 255, 255));
        jChNoCPA.setSelected(true);
        jChNoCPA.setText("No");
        jChNoCPA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoCPAActionPerformed(evt);
            }
        });
        jChNoCPA.setBounds(830, 220, 39, 23);
        jLayeredPane1.add(jChNoCPA, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiPC.setBackground(new java.awt.Color(255, 255, 255));
        jChSiPC.setText("Si");
        jChSiPC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiPCActionPerformed(evt);
            }
        });
        jChSiPC.setBounds(790, 260, 33, 23);
        jLayeredPane1.add(jChSiPC, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoPC.setBackground(new java.awt.Color(255, 255, 255));
        jChNoPC.setSelected(true);
        jChNoPC.setText("No");
        jChNoPC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoPCActionPerformed(evt);
            }
        });
        jChNoPC.setBounds(830, 260, 39, 23);
        jLayeredPane1.add(jChNoPC, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiDU.setBackground(new java.awt.Color(255, 255, 255));
        jChSiDU.setText("Si");
        jChSiDU.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiDUActionPerformed(evt);
            }
        });
        jChSiDU.setBounds(790, 320, 33, 23);
        jLayeredPane1.add(jChSiDU, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoCD.setBackground(new java.awt.Color(255, 255, 255));
        jChNoCD.setSelected(true);
        jChNoCD.setText("No");
        jChNoCD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoCDActionPerformed(evt);
            }
        });
        jChNoCD.setBounds(830, 440, 39, 23);
        jLayeredPane1.add(jChNoCD, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiCC.setBackground(new java.awt.Color(255, 255, 255));
        jChSiCC.setText("Si");
        jChSiCC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiCCActionPerformed(evt);
            }
        });
        jChSiCC.setBounds(790, 460, 33, 23);
        jLayeredPane1.add(jChSiCC, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoAR.setBackground(new java.awt.Color(255, 255, 255));
        jChNoAR.setSelected(true);
        jChNoAR.setText("No");
        jChNoAR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoARActionPerformed(evt);
            }
        });
        jChNoAR.setBounds(830, 480, 39, 23);
        jLayeredPane1.add(jChNoAR, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiCD.setBackground(new java.awt.Color(255, 255, 255));
        jChSiCD.setText("Si");
        jChSiCD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiCDActionPerformed(evt);
            }
        });
        jChSiCD.setBounds(790, 440, 33, 23);
        jLayeredPane1.add(jChSiCD, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoCC.setBackground(new java.awt.Color(255, 255, 255));
        jChNoCC.setSelected(true);
        jChNoCC.setText("No");
        jChNoCC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoCCActionPerformed(evt);
            }
        });
        jChNoCC.setBounds(830, 460, 39, 23);
        jLayeredPane1.add(jChNoCC, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoED.setBackground(new java.awt.Color(255, 255, 255));
        jChNoED.setSelected(true);
        jChNoED.setText("No");
        jChNoED.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoEDActionPerformed(evt);
            }
        });
        jChNoED.setBounds(830, 280, 39, 23);
        jLayeredPane1.add(jChNoED, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiAR.setBackground(new java.awt.Color(255, 255, 255));
        jChSiAR.setText("Si");
        jChSiAR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiARActionPerformed(evt);
            }
        });
        jChSiAR.setBounds(790, 480, 33, 23);
        jLayeredPane1.add(jChSiAR, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoDU.setBackground(new java.awt.Color(255, 255, 255));
        jChNoDU.setSelected(true);
        jChNoDU.setText("No");
        jChNoDU.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoDUActionPerformed(evt);
            }
        });
        jChNoDU.setBounds(830, 320, 39, 23);
        jLayeredPane1.add(jChNoDU, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiBA.setBackground(new java.awt.Color(255, 255, 255));
        jChSiBA.setText("Si");
        jChSiBA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiBAActionPerformed(evt);
            }
        });
        jChSiBA.setBounds(790, 340, 33, 23);
        jLayeredPane1.add(jChSiBA, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiID.setBackground(new java.awt.Color(255, 255, 255));
        jChSiID.setText("Si");
        jChSiID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiIDActionPerformed(evt);
            }
        });
        jChSiID.setBounds(790, 360, 33, 23);
        jLayeredPane1.add(jChSiID, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoID.setBackground(new java.awt.Color(255, 255, 255));
        jChNoID.setSelected(true);
        jChNoID.setText("No");
        jChNoID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoIDActionPerformed(evt);
            }
        });
        jChNoID.setBounds(830, 360, 39, 23);
        jLayeredPane1.add(jChNoID, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiMov.setBackground(new java.awt.Color(255, 255, 255));
        jChSiMov.setText("Si");
        jChSiMov.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiMovActionPerformed(evt);
            }
        });
        jChSiMov.setBounds(790, 400, 33, 23);
        jLayeredPane1.add(jChSiMov, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoMov.setBackground(new java.awt.Color(255, 255, 255));
        jChNoMov.setSelected(true);
        jChNoMov.setText("No");
        jChNoMov.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoMovActionPerformed(evt);
            }
        });
        jChNoMov.setBounds(830, 400, 39, 23);
        jLayeredPane1.add(jChNoMov, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChSiED.setBackground(new java.awt.Color(255, 255, 255));
        jChSiED.setText("Si");
        jChSiED.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChSiEDActionPerformed(evt);
            }
        });
        jChSiED.setBounds(790, 280, 33, 23);
        jLayeredPane1.add(jChSiED, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jChNoBA.setBackground(new java.awt.Color(255, 255, 255));
        jChNoBA.setSelected(true);
        jChNoBA.setText("No");
        jChNoBA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jChNoBAActionPerformed(evt);
            }
        });
        jChNoBA.setBounds(830, 340, 39, 23);
        jLayeredPane1.add(jChNoBA, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel3.setText("Centro de Datos p Data Center (Hospedaje Web y Base de Datos, respaldos / recuperación, almacenamiento y colocación)");
        jLabel3.setBounds(50, 450, 610, 14);
        jLayeredPane1.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel4.setText("Línea telefónica móvil celular");
        jLabel4.setBounds(50, 410, 136, 14);
        jLayeredPane1.add(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel5.setBackground(new java.awt.Color(255, 255, 255));
        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel5.setText("Servicios Móviles Corporativos");
        jLabel5.setBounds(30, 390, 320, 14);
        jLayeredPane1.add(jLabel5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel6.setText("Internet Dedicado");
        jLabel6.setBounds(50, 370, 87, 14);
        jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel7.setText("Banda Ancha");
        jLabel7.setBounds(50, 350, 63, 14);
        jLayeredPane1.add(jLabel7, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel8.setText("Dial Up");
        jLabel8.setBounds(50, 330, 33, 14);
        jLayeredPane1.add(jLabel8, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel9.setText("Servicios de Internet");
        jLabel9.setBounds(30, 310, 180, 14);
        jLayeredPane1.add(jLabel9, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel10.setText("Enlaces Dedicados (Enlaces Digitales Dedicados, Enlaces Dedicados TDM, Clear Channel)");
        jLabel10.setBounds(50, 290, 423, 14);
        jLayeredPane1.add(jLabel10, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel11.setText("Puertos Conmutados (Frame Relay, Lan to Lan o L2L, VPN IP, MPLS, Metro Ethernet, Datos VDSL, Mtrolan Datos)");
        jLabel11.setBounds(50, 270, 543, 14);
        jLayeredPane1.add(jLabel11, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel12.setText("Servicio de Transmisión de Datos");
        jLabel12.setBounds(30, 250, 240, 14);
        jLayeredPane1.add(jLabel12, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel13.setText("Central Privada Automática (CPA)");
        jLabel13.setBounds(50, 230, 250, 14);
        jLayeredPane1.add(jLabel13, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel14.setText("Líneas Telefónicas Comercales");
        jLabel14.setBounds(50, 210, 145, 14);
        jLayeredPane1.add(jLabel14, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel15.setText("Posee el servicio");
        jLabel15.setBounds(780, 170, 110, 14);
        jLayeredPane1.add(jLabel15, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel16.setText("Centro de Contacto (Portal de Voz, IVR, Estación de Trabajo, Centro de Llamadas o Call Center, Grabación de Llamadas, Personal de Apoyo y Soporte)");
        jLabel16.setBounds(50, 470, 750, 14);
        jLayeredPane1.add(jLabel16, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel17.setText("Administración de Redes WAN/LAN /Administración Delegada, Monitoreo Proactivo");
        jLabel17.setBounds(50, 490, 680, 14);
        jLayeredPane1.add(jLabel17, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel18.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel18.setText("Servicios de Tecnología, Información y Telecomunicaciones");
        jLabel18.setBounds(30, 430, 350, 14);
        jLayeredPane1.add(jLabel18, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/lineaDivisoria.png"))); // NOI18N
        jLabel19.setText("jLabel19");
        jLabel19.setBounds(20, 300, 980, 14);
        jLayeredPane1.add(jLabel19, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/lineaDivisoria.png"))); // NOI18N
        jLabel20.setText("jLabel19");
        jLabel20.setBounds(20, 380, 980, 14);
        jLayeredPane1.add(jLabel20, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/lineaDivisoria.png"))); // NOI18N
        jLabel21.setText("jLabel19");
        jLabel21.setBounds(20, 420, 980, 14);
        jLayeredPane1.add(jLabel21, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/lineaDivisoria.png"))); // NOI18N
        jLabel22.setText("jLabel19");
        jLabel22.setBounds(20, 180, 980, 14);
        jLayeredPane1.add(jLabel22, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/lineaDivisoria.png"))); // NOI18N
        jLabel23.setText("jLabel19");
        jLabel23.setBounds(20, 240, 980, 14);
        jLayeredPane1.add(jLabel23, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel24.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel24.setText("Servicios de voz:");
        jLabel24.setBounds(30, 190, 110, 14);
        jLayeredPane1.add(jLabel24, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel25.setText("¿La empresa / institución maneja directamente los servicios de telecomunicaciones con los proveedores o los delega a otra empresa a través de un contratista?");
        jLabel25.setBounds(30, 100, 860, 14);
        jLayeredPane1.add(jLabel25, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jBAceptarServicios.setText("Aceptar");
        jBAceptarServicios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAceptarServiciosActionPerformed(evt);
            }
        });
        jBAceptarServicios.setBounds(860, 540, 71, 23);
        jLayeredPane1.add(jBAceptarServicios, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Vista/Imagenes/fondoBlanco.png"))); // NOI18N
        jLabel1.setText("jLabel1");
        jLabel1.setBounds(0, -30, 1030, 610);
        jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1024, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
        );

        setSize(new java.awt.Dimension(1040, 618));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jCSiLTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCSiLTActionPerformed
        this.jChNoLT.setSelected(false);
    }//GEN-LAST:event_jCSiLTActionPerformed

    private void jChNoLTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoLTActionPerformed
        this.jCSiLT.setSelected(false);
    }//GEN-LAST:event_jChNoLTActionPerformed

    private void jChSiCPAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiCPAActionPerformed
        this.jChNoCPA.setSelected(false);
    }//GEN-LAST:event_jChSiCPAActionPerformed

    private void jChNoCPAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoCPAActionPerformed
        this.jChSiCPA.setSelected(false);
    }//GEN-LAST:event_jChNoCPAActionPerformed

    private void jChSiPCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiPCActionPerformed
        this.jChNoPC.setSelected(false);
    }//GEN-LAST:event_jChSiPCActionPerformed

    private void jChNoPCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoPCActionPerformed
        this.jChSiPC.setSelected(false);
    }//GEN-LAST:event_jChNoPCActionPerformed

    private void jChSiEDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiEDActionPerformed
        this.jChNoED.setSelected(false);
    }//GEN-LAST:event_jChSiEDActionPerformed

    private void jChNoEDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoEDActionPerformed
        this.jChSiED.setSelected(false);
    }//GEN-LAST:event_jChNoEDActionPerformed

    private void jChSiDUActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiDUActionPerformed
        this.jChNoDU.setSelected(false);
    }//GEN-LAST:event_jChSiDUActionPerformed

    private void jChNoDUActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoDUActionPerformed
        this.jChSiDU.setSelected(false);
    }//GEN-LAST:event_jChNoDUActionPerformed

    private void jChSiBAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiBAActionPerformed
        this.jChNoBA.setSelected(false);
    }//GEN-LAST:event_jChSiBAActionPerformed

    private void jChNoBAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoBAActionPerformed
        this.jChSiBA.setSelected(false);
    }//GEN-LAST:event_jChNoBAActionPerformed

    private void jChSiIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiIDActionPerformed
        this.jChNoID.setSelected(false);
    }//GEN-LAST:event_jChSiIDActionPerformed

    private void jChNoIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoIDActionPerformed
        this.jChSiID.setSelected(false);
    }//GEN-LAST:event_jChNoIDActionPerformed

    private void jChSiMovActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiMovActionPerformed
        this.jChNoMov.setSelected(false);
    }//GEN-LAST:event_jChSiMovActionPerformed

    private void jChNoMovActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoMovActionPerformed
        this.jChSiMov.setSelected(false);
    }//GEN-LAST:event_jChNoMovActionPerformed

    private void jChSiCDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiCDActionPerformed
        this.jChNoCD.setSelected(false);
    }//GEN-LAST:event_jChSiCDActionPerformed

    private void jChNoCDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoCDActionPerformed
        this.jChSiCD.setSelected(false);
    }//GEN-LAST:event_jChNoCDActionPerformed

    private void jChSiCCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiCCActionPerformed
        this.jChNoCC.setSelected(false);
    }//GEN-LAST:event_jChSiCCActionPerformed

    private void jChNoCCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoCCActionPerformed
        this.jChSiCC.setSelected(false);
    }//GEN-LAST:event_jChNoCCActionPerformed

    private void jChSiARActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChSiARActionPerformed
        this.jChNoAR.setSelected(false);
    }//GEN-LAST:event_jChSiARActionPerformed

    private void jChNoARActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jChNoARActionPerformed
        this.jChSiAR.setSelected(false);
    }//GEN-LAST:event_jChNoARActionPerformed

    private void jBAceptarServiciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAceptarServiciosActionPerformed
        if (JOptionPane.showConfirmDialog(null,"¿Está conforme con las "
            + "selecciones realizadas?","Precaucion!!",
            JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION){
                
            if(!realizarValidaciones()){
                JOptionPane.showMessageDialog(null,"Debe realizar la "
                    + "selección de los servicios que posee la empresa / "
                    + "insitución", "Error", JOptionPane.ERROR_MESSAGE);
            }
            else {
                 if (jChContratista.isSelected())
                     LogicaAplicacion.setP1(2);
                 else LogicaAplicacion.setP1(1);
                 
                obtenerListadoPreguntasRealizar();
                
            }
        }        
                
    }//GEN-LAST:event_jBAceptarServiciosActionPerformed

    private void obtenerListadoPreguntasRealizar(){
     // Las preguntas van a guardarse en orden..
      serviciosSeleccionados = new ArrayList<Servicio>();  
      LogicaAplicacion.setP2s(new ArrayList());
        //Servicios de voz.

            if (jCSiLT.isSelected()){
                LogicaAplicacion.agregarRepuestasp2s(1);
                //System.out.println("Línea telefónica");
                serviciosSeleccionados.add(new Servicio(servicios[0],TipoServicios[0]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiCPA.isSelected()){
                //System.out.println("Línea CPA");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[1],TipoServicios[0]));
            }
           else LogicaAplicacion.agregarRepuestasp2s(2);
            //Servicios de transmisión de datos.

            if (jChSiPC.isSelected()){
                //System.out.println("Puerto Conmutado");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[2],TipoServicios[1]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiED.isSelected()) {
                //System.out.println("Enlace Dedicado");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[3],TipoServicios[1]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            //Servicios de Internet

            if (jChSiDU.isSelected()){
                //System.out.println("Dial Up");
                hayInternet = true;
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[4],TipoServicios[2]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiBA.isSelected()){
                //System.out.println("Banda Ancha");
                hayInternet = true;
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[5],TipoServicios[2]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiID.isSelected()){
                //System.out.println("Internet Dedicado");
                LogicaAplicacion.agregarRepuestasp2s(1);
                hayInternet = true;
                serviciosSeleccionados.add(new Servicio(servicios[6],TipoServicios[2]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (hayInternet){
                System.out.println("Hay internet, agregando la pantalla extra");
               serviciosSeleccionados.add(new Servicio("DISPOSITIVOS DE INTERNET","INTERNET")); 
            }
            else System.out.println("No hay internet.. No se va a agregar la pantalla");
            
       //Servicios de móviles corporativos.

            if (jChSiMov.isSelected()){
                //System.out.println("Lineas móviles corporativas");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[7],TipoServicios[3]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
       //Servicios de tecnología y telecomunicaciones.

            if (jChSiCD.isSelected()){
                //System.out.println("Data Center");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[8],TipoServicios[4]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiCC.isSelected()){
                //System.out.println("Centro de Contacto");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[9],TipoServicios[4]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
            
            if (jChSiAR.isSelected()){
                //System.out.println("Administración de Redes");
                LogicaAplicacion.agregarRepuestasp2s(1);
                serviciosSeleccionados.add(new Servicio(servicios[10],TipoServicios[4]));
            }
            else LogicaAplicacion.agregarRepuestasp2s(2);
       // - Obteniendo los id's de los servicios que se indican en la lista de checks!

//            for (int i = 0; i< LogicaAplicacion.getP2s().size(); i++)
//                System.out.println(LogicaAplicacion.getP2s().get(i));
        
           LogicaAplicacion.setContarInternet(obtenerCuentaServiciosInternet());
           
        FactoryVistas.obtenerSiguientePregunta(LogicaServicio.
         obtenerIdsServiciosSeleccionados(serviciosSeleccionados),
         minutos, segundos, horas,0).setVisible(true);
       
       this.dispose();
       
    }
    
    private int obtenerCuentaServiciosInternet(){
        
        int total = 0;
        
          if (jChSiDU.isSelected())
              total = total + 1;
          
          if (jChSiBA.isSelected())
              total = total + 1;
          
          if (jChSiID.isSelected())
              total = total + 1;
          
          return total;
    }
    
    private Boolean realizarValidaciones(){
        if (!jChContratista.isSelected() && !jChDirectamente.isSelected())
            return false;
        else{
            if (!jChNoAR.isSelected() && !jChSiAR.isSelected() &&
                !jChNoBA.isSelected() && !jChSiBA.isSelected() &&
                !jChNoCC.isSelected() && !jChSiCC.isSelected() &&
                !jChNoCPA.isSelected() && !jChSiCPA.isSelected() &&
                !jChNoMov.isSelected() && !jChSiMov.isSelected() &&
                !jChNoCD.isSelected() && !jChSiCD.isSelected() &&
                !jChNoLT.isSelected() && !jCSiLT.isSelected() &&
                !jChNoED.isSelected() && !jChSiED.isSelected() &&
                !jChNoID.isSelected() && !jChSiID.isSelected() &&
                !jChNoDU.isSelected() && !jChSiDU.isSelected() &&
                !jChNoPC.isSelected() && !jChSiPC.isSelected())
                return false;
            else
                return true;
        }
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InicioEntrevista().setVisible(true);
            }
        });
    }

    public void run() {
        try {
            while (inicio){

                if(segundos != 59) {
                   segundos++;
                }else{
                    if(minutos != 59){
                        segundos = 0;
                        minutos++;
                    }else{
                            horas++;
                            minutos = 0;
                            segundos = 0;
                    }
                }

                if (minutos >= 10)
                    jLTimer.setForeground(Color.red);
                
                    jLTimer.setText(horas+":"+minutos+":"+segundos);

                Thread.sleep(999);
            }

        } catch (InterruptedException ex) {
            System.out.println("Error en el sleep de aplicacion = " +ex.getMessage());
        }
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAceptarServicios;
    private javax.swing.JCheckBox jCSiLT;
    private javax.swing.JCheckBox jChContratista;
    private javax.swing.JCheckBox jChDirectamente;
    private javax.swing.JCheckBox jChNoAR;
    private javax.swing.JCheckBox jChNoBA;
    private javax.swing.JCheckBox jChNoCC;
    private javax.swing.JCheckBox jChNoCD;
    private javax.swing.JCheckBox jChNoCPA;
    private javax.swing.JCheckBox jChNoDU;
    private javax.swing.JCheckBox jChNoED;
    private javax.swing.JCheckBox jChNoID;
    private javax.swing.JCheckBox jChNoLT;
    private javax.swing.JCheckBox jChNoMov;
    private javax.swing.JCheckBox jChNoPC;
    private javax.swing.JCheckBox jChSiAR;
    private javax.swing.JCheckBox jChSiBA;
    private javax.swing.JCheckBox jChSiCC;
    private javax.swing.JCheckBox jChSiCD;
    private javax.swing.JCheckBox jChSiCPA;
    private javax.swing.JCheckBox jChSiDU;
    private javax.swing.JCheckBox jChSiED;
    private javax.swing.JCheckBox jChSiID;
    private javax.swing.JCheckBox jChSiMov;
    private javax.swing.JCheckBox jChSiPC;
    private javax.swing.JLabel jLLogo;
    private javax.swing.JLabel jLSponsor;
    private javax.swing.JLabel jLTimer;
    private javax.swing.JLabel jLTitulo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLayeredPane jLayeredPane1;
    // End of variables declaration//GEN-END:variables

}
